/*
 * Created on 27/02/2004
 *
 * To change the template for this generated file go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
package org.potiorb.orb.iiop;

import java.net.Socket;
import java.net.SocketException;

public class EndPoint {
	private TransportWrapper m_TransportWrapper;

	public EndPoint(Socket service)
	{
		m_TransportWrapper = new SocketsWrapper(service);
	}

	public EndPoint(String host, int port){
		m_TransportWrapper = new SocketsWrapper(host,port);
	}

	public void Send(Object obj) throws SocketException{
		m_TransportWrapper.write(obj);
	}

	public Object Receive() throws SocketException{
		return m_TransportWrapper.read();
	}


}
